-
Notifications
You must be signed in to change notification settings - Fork 903
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add default for env
in KedroContext
#3958
Conversation
Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>
Thanks for looking into this! |
@yury-fedotov Thanks for reporting the issue :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I overlooked this. Can we keep the change at the same line? This is changing the order of arguments, is it needed?
@noklam It was erroring out saying arguments with default values cannot be before ones without default values |
Unfortunately, changing the order of arguments is a breaking change. So in this case it's better to ignore the error about argument order instead. |
Signed-off-by: Ankita Katiyar <ankitakatiyar2401@gmail.com>
env: str | None = field(init=True, default=None)
_package_name: str = field(init=True, default="")
_hook_manager: PluginManager | None = field(init=True, default=None) Unfortunately I think there is no nice solution here. ^ I don't think there should be a default for For My suggestion is not to fix anything in In our own testing docs, KedroContext is not mentioned at all. |
@noklam yeah, i'll add your comment to the issue and put that in backlog and close this PR for now! |
Description
Fix #3954
Development notes
I checked the test with Kedro 0.18.14 and it was still working. The test breaks from 0.19 with this change - #3300
Add a default value
None
toenv
.Developer Certificate of Origin
We need all contributions to comply with the Developer Certificate of Origin (DCO). All commits must be signed off by including a
Signed-off-by
line in the commit message. See our wiki for guidance.If your PR is blocked due to unsigned commits, then you must follow the instructions under "Rebase the branch" on the GitHub Checks page for your PR. This will retroactively add the sign-off to all unsigned commits and allow the DCO check to pass.
Checklist
RELEASE.md
file